<script src="{{ getAssets }}js/amazeui.datatables.min.js?v={{ assets_version }}"></script>
<script>
var tables = $('#dataTables').DataTable({
    "sAjaxSource" : ''
    ,"bLengthChange": false
    ,"fnServerData" : function(sSource, aoData, fnCallback) {
        var params = checkQueryTableData(aoData);
        $.post(sSource, JSON.stringify(params),function(resp) {
            fnCallback(resp);
        },'json')
    }
    ,columns: [
        {"bSortable": false, render:function(data, type, full, meta) {
                return productTypeidName(full.Products.TypeId);
        }}
        ,{"bSortable": false, render:function(data, type, full, meta) {
            return productGroupName(full.Products);
        }}
        ,{"bSortable": false, render:function(data, type, full, meta) {
            if(full.Products.TypeId == 20) {
                return '球镜:'+ full.Snd.sph +' <br />柱镜:'+ full.Snd.cyl +'';
            } else {
                return '规格：'+full.Products.Spec+'<br />保质期：'+full.Products.ShelfLife;
            }
        }}
        ,{"data" : "lot_number", "bSortable": false}
        ,{"data" : "manufacture_date", "bSortable": false, render:function(data, type, full, meta) {
                return timetransDate(data);
        }}
        ,{"data" : "expiry_date", "bSortable": false, render:function(data, type, full, meta) {
            return timetransDate(data);
        }}
        ,{"data" : "accept_num", "bSortable": false}
    ]
    ,"serverSide": true
    ,"bPaginate" : false
    ,"bFilter" : false	//是否启动过滤、搜索功能
    ,"bInfo" : false //是否显示页脚信息，DataTables插件左下角显示记录数
    ,"bProcessing" : true //DataTables载入数据时，是否显示‘进度’提示
});

</script>